<div>
    <hr>
    <ul class="breadcrumb">
        <li>
            <a href="<?php echo Yii::app()->createUrl('site/index'); ?>">Trang chủ</a> <span class="divider">/</span>
        </li>
        <li>
            <a href="#">Chỉnh sửa danh mục</a>
        </li>
    </ul>
    <hr>
</div>
<div class="row-fluid sortable">
    <div class="box span12">
        <div class="box-header" data-original-title>
            <h2><i class="icon-user"></i><span class="break"></span>Chỉnh sửa thông tin người dùng</h2>
            <div class="box-icon">
                <a href="#" class="btn-setting"><i class="icon-wrench"></i></a>
                <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
                <a href="#" class="btn-close"><i class="icon-remove"></i></a>
            </div>
        </div>
        <div class="box-content">
            <form class="form-horizontal" method="post" action="<?php echo Yii::app()->createUrl('user/update',array('id' => $model['id'])); ?>">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label" for="date01">Tên người dùng</label>
                        <div class="controls">
                            <input type="text" class="input-xlarge" name="User[name]" value="<?php echo $model['name']; ?>">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="date01">Email</label>
                        <div class="controls">
                            <input type="text" class="input-xlarge" name="User[email]" disabled value="<?php echo $model['email']; ?>">
                        </div>
                    </div> 
                    <div class="control-group">
                        <label class="control-label" for="date01">Ngày sinh</label>
                        <div class="controls">
                            <select name="User[birthday][0]" class="cmb_user">
                                <?php for($i = 1 ; $i <= 31 ; $i ++):  ?>
                                    <?php if($model['birthday'][0] == $i) : ?>
                                        <option selected value="<?php echo $model['birthday'][0]; ?>"><?php echo $model['birthday'][0]; ?></option>
                                    <?php else : ?>
                                        <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php endif; ?>
                                <?php endfor; ?>
                            </select>
                            <select name="User[birthday][1]" class="cmb_user">
                                <?php for($i = 1 ; $i <= 12 ; $i ++):  ?>
                                    <?php if($model['birthday'][1] == $i) : ?>
                                        <option selected value="<?php echo $model['birthday'][1]; ?>"><?php echo $model['birthday'][1]; ?></option>
                                    <?php else : ?>
                                        <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php endif; ?>
                                <?php endfor; ?>
                            </select>
                            <select name="User[birthday][2]" class="cmb_user">
                                <?php for($i = 1930 ; $i <= date('Y') - 1 ; $i ++):  ?>
                                    <?php if($model['birthday'][2] == $i) : ?>
                                        <option selected value="<?php echo $model['birthday'][2]; ?>"><?php echo $model['birthday'][2]; ?></option>
                                    <?php else : ?>
                                        <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                                    <?php endif; ?>
                                <?php endfor; ?>
                            </select>
                        </div>
                    </div> 
                    <div class="control-group">
                        <label class="control-label" for="date01">Giới tính</label>
                        <div class="controls">
                            <select name="User[gender]" class="cmb_user">
                            <?php if($model['gender'] == 1) : ?>
                                <option selected value="<?php echo $model['gender']; ?>">Nam</option>
                                <option value="0">Nữ</option>
                            <?php else : ?>
                                <option value="1">Nam</option>
                                <option selected value="<?php echo $model['gender']; ?>">Nữ</option>
                            <?php endif; ?>
                            </select>
                        </div>
                    </div>   
                    <div class="control-group">
                        <label class="control-label" for="date01">Số điện thoại</label>
                        <div class="controls">
                            <input type="text" class="input-xlarge" name="User[phone]" value="<?php echo $model['phone']; ?>">
                        </div>
                    </div>       
                    <div class="form-actions">
                        <button type="submit" class="btn btn-primary">Cập nhật</button>
                        <button type="reset" class="btn">Hủy bỏ</button>
                    </div>
                </fieldset>
            </form>   

        </div>
    </div><!--/span-->